﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;

namespace BL
{
    public class SanPhamBL
    {
        SanPhamQuery sanPham = new SanPhamQuery();
        public List<SanPhamDAL> LayDanhSachSanPham()
        {
            return sanPham.LayDanhSachSanPham();
        }

        public List<SanPhamDAL> LayDanhSachSanPhamKhuyenMai()
        {
            return sanPham.LayDanhSachSanPhamKhuyenMai();
        }

        public List<SanPhamDAL> LayDanhSachSanPhamMoi()
        {
            return sanPham.LayDanhSachSanPhamMoi();
        }

        public bool ThemSanPhamMoi(SanPhamDAL sp)
        {
            return sanPham.ThemSanPhamMoi(sp);
        }

        public List<SanPhamDAL> LayDSSanPhamTheoMaLoai(string maLoai)
        {
            return sanPham.LayDSSanPhamTheoMaLoai(maLoai);
        }

        public SanPhamDAL LaySanPhamTheoMaSP(string masp)
        {
            return sanPham.LaySanPhamTheoMaSP(masp);
        }

        public bool CapNhatSanPham(SanPhamDAL sp)
        {
            return sanPham.CapNhatSanPham(sp);
        }

        public bool CapNhatTinhTrangSanPham(SanPhamDAL sp)
        {
            return sanPham.CapNhatTinhTrangSanPham(sp);
        }
    }
}
